home *** CD-ROM | disk | FTP | other *** search
- function ToggleVisibility() {
-
- var Element = document.getElementById('FIXED_DIV');
- var maxHeight = 40;
- var sourceLinks = document.getElementById('REMINDER_DIV');
- var DT = document.getElementById('DateTime');
- var currentHeight = parseInt(sourceLinks.scrollHeight);
-
- if (currentHeight < maxHeight) {
- <!-- no scroll bars visible, so nothing to do -->
- return
- }
-
- <!-- dynamically copy the list of reminders to the new popup window -->
- Element.innerHTML = sourceLinks.innerHTML;
-
- var remLabel = document.getElementById('REMINDER_LABEL');
-
- if(Element.style.visibility == 'visible') {
-
- Element.style.visibility = 'hidden';
- remLabel.title = 'click to expand reminders'; <!-- change the tooltip -->
-
- } else {
-
- var oElement = Element;
- var borderHeight = 1;
-
- if(window.getComputedStyle) {
- alert(window.getComputedStyle(sourceLinks,null).left);
- Element.style.left = window.getComputedStyle(sourceLinks,null).left;
- borderHeight = parseInt(window.getComputedStyle(oElement,null).borderBottomWidth);
- } else if (oElement.currentStyle) {
- alert(sourceLinks.currentStyle.left);
- Element.style.left = sourceLinks.currentStyle.left;
- borderHeight = parseInt(oElement.currentStyle.borderBottomWidth);
- }
-
- Element.style.height = currentHeight + borderHeight;
- Element.style.visibility = 'visible';
- remLabel.title = 'click to hide reminders'; <!-- change the tooltip -->
- }
- }
-
- function hideReminders() {
- alert('hiding');
- document.getElementById('FIXED_DIV').style.visibility = 'hidden';
- }
-
- function getOuterHTML(obj){
-
- temp=document.getElementById(obj).cloneNode(true)
- document.getElementById('tempDiv').appendChild(temp)
- outer=document.getElementById('tempDiv').innerHTML
- document.getElementById('tempDiv').innerHTML=""
- return outer
-
- }
-
-
- <!-- alternative to hard-coding an onload statement in the body tag -->
- <!-- this writes our custom reminder toggling function as a javascript link in the appropriate tag -->
- <!-- doing everything this way allows the source HTML to remain completely generic other than the ID tags -->
-
- window.onload = function WriteClick() {
- document.getElementById('reminderLink').href = "javascript:ToggleVisibility()";
- }
-
-